<template>
  <h1>EL-下拉选框组件</h1>
  <el-select  placeholder="请选择"
    style="width:50%" v-model="city">
    <el-option label="北京" value="beijing"></el-option>
    <el-option label="上海" value="shanghai"></el-option>
    <el-option label="广州" value="guangzhou"></el-option>
    <el-option label="深圳" value="shenzhen"></el-option>
  </el-select>
  <h4>{{city}}</h4>
</template>
<script setup>
//定义变量保存下拉选择的值
import {ref} from "vue";

const city = ref('hahaha')
</script>


<style scoped>

</style>